using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using FytSoa.Common.Enum;
using FytSoa.Domain.Erp;
using SqlSugar;

namespace FytSoa.Application.Erp;

/// <summary>
/// erp_流程使用
/// </summary>
public class ErpFlowUseDto : AppEntity
{
    /// <summary>
    /// 流程编号
    /// </summary>
    [Required]
    public long FlowId { get; set; }

    /// <summary>
    /// 节点包括自定义
    /// </summary>
    public List<ErpFlowUse.ErpFlowUseNodes> Nodes { get; set; } = new();

    /// <summary>
    /// 使用者编号
    /// </summary>
    [Required]
    public long UseId { get; set; } = 0;
    
    /// <summary>
    /// 流程类型
    /// </summary>
    public FlowTypeEnum Type { get; set; } = 0;

    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public int Status { get; set; } = 1;
    
    /// <summary>
    /// 表单内容
    /// </summary>
    public List<ErpFlowUse.FormModel> Form { get; set; } = new();

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;

    /// <summary>
    /// 更新人
    /// </summary>
    public string UpdateUser { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }


}